package com.foreknow.elmboot.service.impl;

import com.foreknow.elmboot.mapper.UserMapper;
import com.foreknow.elmboot.po.Business;
import com.foreknow.elmboot.po.User;
import com.foreknow.elmboot.service.BusinessService;
import com.foreknow.elmboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserByIdByPassService(String userId, String password) {
        return userMapper.getUserByIdByPassDao(userId, password);
    }

    @Override
    public int getUserByIdService(String userId) {
        return userMapper.getUserByIdDao(userId);
    }

    @Override
    public int saveUserService(User user) {
        return userMapper.saveUserDao(user);
    }
}
